#!/bin/bash -e

function info() {
echo Usage: `basename $0` '[-u num -T(no_train)] test test2 ...'
exit 1
}

while getopts  ":p:f:u:T" opt; do
	case  $opt  in
		p) out_prefix=$OPTARG;;
		f) suffix=$OPTARG;;
        u) num=$OPTARG;;
        T) train=false;;
		*) info;;
	esac
done
shift $(($OPTIND - 1))


if [ $# -lt 1 ]; then info; fi

. $var

num=${num:=2000}
train=${train:=true}

if $train; then
    feature_sub.py -u$num -p$out_prefix $1

    train_pre1.sh -l $data/meth/train_seq/info.x.label.file_name1 -d $data/meth/train_seq $out_prefix.sub.txt


    svc_train.py -p$out_prefix $out_prefix.train_sub_for_test.txt

fi

echo $@
svc_test1.py -p$out_prefix $out_prefix.feature_used.txt $out_prefix.svc.pkl $@ 


. $cmd_done